package spring.r2dbc;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;
import sf.database.annotations.Comment;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Table("t_persion")
public class Person {
    @Id
    private String id;
    private String name;
    @Column("nick_name")
    private String nickName;
    private int age;
    @Transient
    private boolean showMe;
    @CreatedDate
    protected LocalDateTime created;

    @PersistenceConstructor
    public Person() {

    }
}